<?
session_start();
require_once 'utils/user.php';

$m = ManageUser::doLogin();
if ($m->pollMessageByCode(501)) {SessionMsg::pushMessage('login succeed',MSG_HEAD);Client::dropCommand();}
$m1 = $m->pollMessageByCode(301);
if ($m1) {
    SessionMsg::pushMessage($m1[0], MSG_HEAD);
    Client::dropCommand();
}

$m = ManageUser::doLogout();
if ($m->pollMessageByCode(501)) {SessionMsg::pushMessage('logout succeed',MSG_HEAD);Client::dropCommand();}

//require_once 'utils/debug.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="css/all.css"/>
    </head>
    <body>
    <?include 'page/header.php';?>
        <a href="creat.php">Creat an article.</a><br/>
        <a href="search.php">Search an article.</a><br/>
    </body>
</html>
